<template>

<div style="background-color:#67c23a41;height:100%;width:100%">
    <div>(❁´◡`❁)</div>
    
    <div style="font-size:24px;margin-top:20px"><el-button @click="back" icon="el-icon-arrow-left"  style="float:left;background-color:rgba(50, 205, 50, 0);">返回</el-button>我的信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
    <div>
    <el-form :label-position="labelPosition" label-width="80px" style="margin-right:20px;margin-top:20px">
  <el-form-item label="昵称">
    <el-input v-model="input1" disabled></el-input>
  </el-form-item>
  <el-form-item label="用户名">
    <el-input v-model="inputt" disabled></el-input>
  </el-form-item>
  <el-form-item label="联系电话">
    <el-input v-model="input2" disabled></el-input>
  </el-form-item>
  <el-form-item label="年龄">
    <el-input v-model="input3" disabled></el-input>
  </el-form-item>
  <el-form-item label="账户余额">
    <el-input v-model="input4" disabled></el-input>
  </el-form-item>
</el-form>

</div>

<div style="margin-top:312px">
    <el-button-group>
    <el-button type="primary" plain style="width:103px;font-size:16px">修改信息</el-button>
    <el-button type="success" plain style="width:104px;font-size:16px">我的接单</el-button>
    <el-button type="success" plain style="width:104px;font-size:16px">我的订单</el-button>
    <el-button type="warning" plain style="width:103px;font-size:16px">我要充值</el-button>
    </el-button-group>
</div>
</div>

</template>

<script>
export default {
    data() {
      return {
      inputt:'',
      input1:'',
      input2:'',
      input3:'',
      input4:'',
      alist: [],
        newList : {},
        labelPosition: 'right',
       
      };
    },
created(){
this.test();
},
methods : {
        test(){
        var newList =  this.$route.query.qaq; //获取id
      
        console.log("mine"+newList)
      
        this.axios.get("http://localhost:3000/users/"+newList,).then((response) => {
        this.alist = response.data;
            console.log(this.alist)
            this.inputt = this.alist.username;
            this.input1 = this.alist.uname;
            this.input2 = this.alist.phone;
            this.input3 = this.alist.age;
            this.input4 = this.alist.money;
      });
      
    },
    back(){
      this.$router.go(-1);
    },
    }
}
</script>

